<!DOCTYPE html>
<html>
<head>
    <title>商品列表</title>
    <link rel="stylesheet" href="http://cdn.bootcss.com/bootstrap/3.3.0/css/bootstrap.min.css">
    <style type="text/css">
        body {
            margin: 20 auto 0 auto;
        }
    </style>
</head>
<body>
<div class="btn-group">
    <a href="/admin_1427a/coupon" class="btn btn-default active" role="button">所有优惠卷</a>
    <a href="/admin_1427a/coupon/edit" class="btn btn-default" role="button">添加优惠卷</a>
</div>
<table class="table table-bordered">
    <tr>
        <th>id</th>
        <th>优惠名称</th>
        <th>使用范围类型</th>
        <th>总领取数</th>
        <th>已使用数</th>
        {{--<th>最小使用金额</th>--}}
        <th>面额</th>
        <th>创建时间</th>
        <th>操作</th>

    </tr>
    @foreach($list as $coupon)
        <tr>
            <td>{{ $coupon->id }}</td>
            <td>{{ $coupon->name }}</td>
            <td>@if($coupon->scope_type==1)满减@elseif($coupon->scope_type==2)赠送商品@elseif($coupon->scope_type==3)赠送小妖币@endif</td>
            <td>{{ $coupon->send_num }}</td>
            <td>{{ $coupon->use_num }}</td>
            {{--<td>{{ $coupon->min_price }}</td>--}}
            <td>{{ $coupon->max_value}}</td>
            <td>{{ $coupon->created_at }}</td>
            <td>
                <a href="/admin_1427a/coupon/edit?id={{$coupon->id}}" class="btn btn-default" role="button">修改</a>
            </td>
        </tr>
    @endforeach
</table>
{{ $list->appends($params)->links() }}
</body>
</html>
